import { get, post } from '../../utils/request';

export function evaluates(obj) {
    // GET /rest/api/v6.0/goods/{goodsId}/evalutes
    return get(`goods/${obj.goodsId}/evalutes`, obj);
}

export function addCartOrBuy(obj) {
    // POST /rest/api/v6.0/cart
    return post(`cart`, obj);
}

export function evaluateDetail(obj) {
    // GET /rest/api/v6.0/goods/evaluateDetail/{gevalId}
    return get(`goods/evaluate/${obj.id}`, obj);
}
//点赞
export function evaluateLike(obj) {
    // GET /rest/api/v6.0/goods/evaluateDetail/{gevalId}
    return post(`goods/evaluate/${obj.id}/like`, obj);
}
//记录二级评论
export function evaluateTwo(obj) {
    // GET /rest/api/v6.0/goods/evaluateDetail/{gevalId}
    return post(`goods/evaluate/${obj.id}/evaluate`, obj);
}